package correct.day17;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
        }
        for(int i = 0; i < n; i++) {
            b[i] = scanner.nextInt();
        }
        int[] happy = new int[n - k + 1];
        int[] shame = new int[n- k + 1];
        for(int i = 0; i < n- k + 1; i++) {
            int x = k;
            while(x != 0) {
                happy[i] += a[i + x - 1];
                shame[i] += b[i + x - 1];
                x--;
            }
        }
        int happyMax = 0;
        int index = 0;
        for(int i = 0; i < n- k + 1; i++) {
            if(happy[i] > happyMax) {
                happyMax = happy[i];
                index = i;
            }
        }
        for(int i = 0; i < n- k + 1; i++) {
            if(happy[i] == happyMax && shame[i] < shame[index]) {
                index = i;
            }
        }
        System.out.println(index + 1);
    }
}
